
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myArticleLabel" data-translate="jhipsterApp.article.home.createOrEditLabel">Create or edit a Article</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.article.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.article.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterApp.article.author" for="field_author">Author</label>
            <input type="text" class="form-control" name="author" id="field_author"
                    ng-model="vm.article.author"
                    required/>
            <div ng-show="editForm.author.$invalid">
                <p class="help-block"
                    ng-show="editForm.author.$error.required" data-translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterApp.article.content" for="field_content">Content</label>
            <input type="text" class="form-control" name="content" id="field_content"
                    ng-model="vm.article.content"
                    required/>
            <div ng-show="editForm.content.$invalid">
                <p class="help-block"
                    ng-show="editForm.content.$error.required" data-translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterApp.article.create_at" for="field_create_at">Create At</label>
                <div class="input-group">
                    <input id="field_create_at" type="text" class="form-control" name="create_at" uib-datepicker-popup="{{dateformat}}" ng-model="vm.article.create_at" is-open="vm.datePickerOpenStatus.create_at"
                    />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('create_at')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterApp.article.views" for="field_views">Views</label>
            <input type="number" class="form-control" name="views" id="field_views"
                    ng-model="vm.article.views"
                    />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhipsterApp.article.good" for="field_good">Good</label>
            <input type="number" class="form-control" name="good" id="field_good"
                    ng-model="vm.article.good"
                    />
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
